import request from '@/utils/request'

// 查询产品信息列表
export function listProinfo(query) {
  return request({
    url: '/mes/proinfo/list',
    method: 'get',
    params: query
  })
}

// 查询产品信息详细
export function getProinfo(id) {
  return request({
    url: '/mes/proinfo/' + id,
    method: 'get'
  })
}

// 新增产品信息
export function addProinfo(data) {
  return request({
    url: '/mes/proinfo',
    method: 'post',
    data: data
  })
}

// 修改产品信息
export function updateProinfo(data) {
  return request({
    url: '/mes/proinfo',
    method: 'put',
    data: data
  })
}

// 删除产品信息
export function delProinfo(id) {
  return request({
    url: '/mes/proinfo/' + id,
    method: 'delete'
  })
}
//查询对应工艺的全部信息
export function getProTec(params) {
  return request({
    url: '/mes/proinfo/getProTec',
    method: 'get',
    params:params
  })
}
export function getBomAndMtrByProId(params){
  return request({
    url: '/mes/proinfo/getBomAndMtrByProId',
    method: 'get',
    params:params
  })
}

export function editProTecAndMtrs(data){
  return request({
    url: '/mes/proinfo/editProTecAndMtrs',
    method: 'post',
    data:data
  })
 }


 export function editProBomAndMtrs(data){
  return request({
    url: '/mes/proinfo/editProBomAndMtrs',
    method: 'post',
    data:data
  })
 }
